-- GENERATED SPELL FOR [Plundering Geist] --


function spell0_30287(pUnit, Event) --@Plunder Health,Heal--
pUnit:FullCastSpellOnTarget(56715,pUnit)
pUnit:RegisterEvent('Sorts_30287', 598, 1)
end

function spell1_30287(pUnit, Event) --@Plunder Health,Heal--
pUnit:FullCastSpellOnTarget(59114,pUnit)
pUnit:RegisterEvent('Sorts_30287', 568, 1)
end

function Sorts_30287(pUnit, Event)
local choix_sorts_30287 = math.random(0, 1)
if choix_sorts_30287 == 0 then
pUnit:RegisterEvent('spell0_30287', 1, 1)
end
if choix_sorts_30287 == 1 then
pUnit:RegisterEvent('spell1_30287', 1, 1)
end
end

function mob30287_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30287', math.random(1500, 3000), 1)
end

function mob30287_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30287_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30287_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30287, 1, 'mob30287_Action')
RegisterUnitEvent(30287, 2, 'mob30287_Leave')
RegisterUnitEvent(30287, 3, 'mob30287_Kill')
RegisterUnitEvent(30287, 4, 'mob30287_Die')
